//-----------------------------------------------------------------------
//<copyright file="ChiTietPhieuXuatBLL.cs
//Code gen by tool.
//</copyright>
//-----------------------------------------------------------------------
using System;
using PMS.Exceptions;
using System.Collections.Generic;
using PMS.DAL;
using PMS.Entity;

namespace PMS.BLL
{
	public class ChiTietPhieuXuatBO : BaseBO
	{
		// Interface Instant Object
		private readonly IChiTietPhieuXuatDAO chitietphieuxuatInterfaceObject = null;

		// Constructor
		public ChiTietPhieuXuatBO()
		{
			chitietphieuxuatInterfaceObject = new DAL.ServiceFactory<IChiTietPhieuXuatDAO>().CurrentDAL;
		}

		#region ChiTietPhieuXuat

		/// <summary>
		///
		/// </summary>
		/// <param name="chitietphieuxuat"></param>
		public ChiTietPhieuXuat CreateChiTietPhieuXuat(ChiTietPhieuXuat chitietphieuxuat)
		{
			try
			{
				return chitietphieuxuatInterfaceObject.CreateChiTietPhieuXuat(chitietphieuxuat);
			}
			catch (Exception ex)
			{
				throw BusinessException.GetException("Business Access CreateChiTietPhieuXuat Exception", ex);
			}
		}

		/// <summary>
		///
		/// </summary>
		/// <param name="chitietphieuxuat"></param>
		public void UpdateChiTietPhieuXuat(ChiTietPhieuXuat chitietphieuxuat)
		{
			try
			{
				chitietphieuxuatInterfaceObject.UpdateChiTietPhieuXuat(chitietphieuxuat);
			}
			catch (Exception ex)
			{
				throw BusinessException.GetException("Business Access UpdateChiTietPhieuXuatException", ex);
			}
		}

		/// <summary>
		///
		/// </summary>
		/// <param name="chitietphieuxuat"></param>
		public void DeleteChiTietPhieuXuat(ChiTietPhieuXuat chitietphieuxuat)
		{
			try
			{
				chitietphieuxuatInterfaceObject.DeleteChiTietPhieuXuat(chitietphieuxuat);
			}
			catch (Exception ex)
			{
				throw BusinessException.GetException("Business Access DeleteChiTietPhieuXuatException", ex);
			}
		}

        /// <summary>
        ///
        /// </summary>
        /// <param name="chitietphieuxuat"></param>
        public void DeleteChiTietPhieuXuatBySoPX(string SoPX)
        {
            try
            {
                chitietphieuxuatInterfaceObject.DeleteChiTietPhieuXuatBySoPX(SoPX);
            }
            catch (Exception ex)
            {
                throw BusinessException.GetException("Business Access DeleteChiTietPhieuXuatException", ex);
            }
        }

		/// <summary>
		///
		/// </summary>
		public ChiTietPhieuXuats GetAllChiTietPhieuXuat()
		{
			try
			{
				return chitietphieuxuatInterfaceObject.GetAllChiTietPhieuXuat();
			}
			catch (Exception ex)
			{
				throw BusinessException.GetException("Business Access GetAllChiTietPhieuXuat Exception", ex);
			}
		}

        /// <summary>
		///
		/// </summary>
        public ChiTietPhieuXuats GetAllChiTietPhieuXuatBySoPX(string SoPX)
		{
			try
			{
                return chitietphieuxuatInterfaceObject.GetAllChiTietPhieuXuatBySoPX(SoPX);
			}
			catch (Exception ex)
			{
				throw BusinessException.GetException("Business Access GetAllChiTietPhieuXuat Exception", ex);
			}
		}
		/// <summary>
		///
		/// </summary>
		/// <param name="maCTPX"></param>
		public ChiTietPhieuXuat GetChiTietPhieuXuatByID(string maCTPX)
		{
			try
			{
				return chitietphieuxuatInterfaceObject.GetChiTietPhieuXuatByID(maCTPX);
			}
			catch (Exception ex)
			{
				throw BusinessException.GetException("Business Access GetChiTietPhieuXuatBy ID Exception", ex);
			}
		}

		#endregion
	}
}
